package views.homme;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import views.projet.onglet.phase.PhaseView;

import main.NotInitializedException;
import models.homme.PersonneFactory.Type;
import models.projet.Phase;

/**
 * Lister du clique sur une personne
 *
 */
public class VoirPersonneListener implements ActionListener
{
	private Type type;
	private PhaseView laVuePhase;

	public VoirPersonneListener(Type type, PhaseView laVuePhase)
	{
		this.type = type;
		this.laVuePhase = laVuePhase;
	}

	@Override
	public void actionPerformed(ActionEvent arg0)
	{
		switch(type)
		{
		case Intervenant : try {
				PopUpPool popI = new PopUpPool(new IntervenantsView(laVuePhase), null, "Pool d'intervenants", true);
			} catch (NotInitializedException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			} break;
		case Candidat : try {
				PopUpPool popC = new PopUpPool(new CandidatsView(), null, "Pool de candidat", true);
			} catch (NotInitializedException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
		}

	}


}
